3 ms·
"What if programming notation were more like music notation?" -> if you look at the denotational semantics listings on the latest Scheme Reports you will see so
by innguest 13y ago
"What if programming notation were more like music notation?" -> if you look at the denotational semantics listings on the latest Scheme Reports you will see something that could be equated to music notation (i.e. they're both instructions on how something should work, and they're sufficient information to get there).
I oftentimes think about these same issues regarding the syntax of different languages. I work in Ruby and I think it's a comfortable language to express ideas in. Scheme is also comfortable and I like it more conceptually, since it gives me this strange comfort of thinking "well, if Scheme disappears forever, at least I have books that can help me make another one", which I never think of languages like Ruby and Perl.
That's why I'm now finally learning Perl; I want to have a better perspective on what I actually like. If it turns out I'm a thousand times more comfortable with Perl than I'd ever be with a Lisp, then I guess I'll just learn to accept that I can't (or don't need to be able to) build the language I use from scratch.
It's just a weird feeling and I'd be curious to know if it's just me. It's this sense of bootstrapping that if I'm not using my own tools all the time (including the language) that I at least need to know how to make them.
- jeffasinger 13y agoWhat would actually stop you from building a language like Perl or Ruby from scratch? Once you've parsed them (which is admittedly much more difficult than Perl), writing a relatively slow interpreter for the core language in C or similar wouldn't be that difficult.
- kbenson 13y agoWhat would actually stop you from building a language like Perl or Ruby from scratch? Perl currently has no specification, other than the latest release of the interpreter. What the interpreter does may be decided to be incorrect by consensus at some point, and changed (although Perl has a very strong history of backwards compatibility so it's unlikely to change unless it was unuseful before), but there is no external resource besides the code and the compiled interpreter to explain how it should behave in every case.
- webjprgm 13y agoNo, but I have my own mental model of how it works, and if I were trying to preserve my own Perl code I'd only need the subset of Perl that I understand and use. I could reconstruct that from scratch with no reference other than my own Perl source code.
- kbenson 13y agoThat's true. And with CPAN Testers and the output of the tests of all the modules against the latest version, you have a pretty damn good reference to go by.
- kbenson 13y agoIf it turns out I'm a thousand times more comfortable with Perl than I'd ever be with a Lisp, then I guess I'll just learn to accept that I can't (or don't need to be able to) build the language I use from scratch. You can also see how you like Perl 6, which has a specification and multiple implementations being built. It's not the same as Perl 5, but it's not meant to be (think of it as a sibling, not a successor).
- webjprgm 13y agoI get the same feeling. That's why I always have this idea in the back of my head that I should learn to make a computer from the sand on a beach in case I'm ever marooned on an island on an alien planet. But I recognize that it's entirely impractical to start from literally nothing. I also keep around my old computers and/or make sure I have emulators that can run my old stuff. E.g. a TRS-80 emulator for the Basic II programs I first learned to write. Or a Mac OS 9 emulator to open Claris Works 4 files I wrote in high school. I rarely use such things, but I feel better knowing my data is not truly lost.