Live data from Hacker News

“Screw it, I'll make my own” – The story of a new programming language

breuleux.net

41–50 of 74 posts

Re: “Screw it, I'll make my own” – The story of a new programming language

#41

Unfortunately, I can't say this is unexpected: http://breuleux.github.io/earl-grey/repl/

Ah, yeah, the link to the REPL in the GitHub repository was broken (I figure that's where you got it). I fixed it. As the other commenter pointed out, the real link is http://breuleux.github.io/earl-grey/repl.html

Re: “Screw it, I'll make my own” – The story of a new programming language

#42
Very interesting account of your experience. I've been toying with the my ideal programming language for some time and am interested. You bring up a good point about people favoring the styles of their most recently used language. For that reason I worry that any language I'd create would merely be a combination of languages I've used previously and not something original. I'm excited to take a look at your work.

Re: “Screw it, I'll make my own” – The story of a new programming language

#43
post #32
post #27

> I chose to compile Earl Grey to JavaScript Some programming languages generate code much deeper down the abstraction stack, e.g. Haskell generating machine code, whereas others generate code to a much shallower depth, e.g. most languages generating JavaScript. A language generating lisp code from some syntax could even be shunting code up the abstraction stack. How deep does the generated code need to be down the s…

If you look at the code, and can't identify it as language X, then it probably deserves a new name.

This sounds pretty similar to the definition of a species.

If two organisms of appropriate gender can't reproduce with each other, then they probably aren't the same species.

If code from two samples can't be interspersed, then it's probably not the same language.

Re: “Screw it, I'll make my own” – The story of a new programming language

#44
post #24
post #18

> There is a bit of a catch-22 in language design where the more a language is used, the clearer it becomes which parts of it are problematic and should change, but the harder it gets to actually change them. To hone a language you must use it, but applications require that a language's features remain stable, robust, set in stone, and therefore as imperfect as they were at that moment. Furthermore, the more delays a…

A nice solution was used during development of the Go language: a tool for code rewriting (it was called "go fix"). It allowed the language authors to quickly and easily transform large swaths of code in the standard library, and also let everybody execute the same transformations in any third-party code. Thus enabling rapid and extremely painless iterations. [I'm consciously simplifying the story a bit to make it sh…

I think that's a neat idea. I've thought about it, but I've never used Go personally and I wasn't sure just how much it would help. I imagine it works best for languages with good static properties/tools for code analysis.

Re: “Screw it, I'll make my own” – The story of a new programming language

#45
post #35

Earlier quoted context omitted.

Case-sensitivity makes sense because it enforces uniformity of code. Case insensitivity only matters when you want to write identifiers differently at different locations. The only place where I see this could be useful is when you use a library that uses a different convention. The IMO better way to solve this is to set a convention for your programming language and enforce it with the compiler (at least with warnin…

As you say, it's about conventions, but with a case-Sensitive system you are more likely going to HAVE TO enforce naming conventions, because there's a distinction now. Otherwise you'd write "MidiPort"/"MIDIPort"/"midiPort" or what have you. Keep in mind we wouldn't need to care about enforcing case in a style guide, if case didn't matter, because there are no distinctions, and you'd be more inclined to write it the…

> Keep in mind we wouldn't need to care about enforcing case in a style guide, if case didn't matter, because there are no distinctions

You would still need it to get uniform code. Spaces vs. tabs also doesn't matter but it's still in almost all style guides.

Re: “Screw it, I'll make my own” – The story of a new programming language

#46
post #13

Curious. Are there examples of programming languages that allow spaces in identifiers? Obviously, it would need to be designed for that. I'm against the case-sensitive nature of some programming languages, and file systems for that matter. While it makes sense in a computing context (faster), you invent a new mode, just for the computer.. (Fortran was probably case-insensitive because upper-case letters were used fir…

Case-sensitivity makes sense because it enforces uniformity of code. Case insensitivity only matters when you want to write identifiers differently at different locations. The only place where I see this could be useful is when you use a library that uses a different convention. The IMO better way to solve this is to set a convention for your programming language and enforce it with the compiler (at least with warnin…

> Case-sensitivity makes sense because it enforces uniformity of code.

I don't see that case-sensitivity helps to achieve uniformity of code that much. Factors like code structure, common design patterns, and source code formatting are more important. The approach to the structure and design of an application or library is something that each individual development group decides for themselves. Source code formatting can (and should) be enforced by formatting tools.

Having used a case-insensitive language for a while (Object Pascal) I find that developers tend to follow the case convention of a given software project anyway and if they don't the case-sensitive typos aren't an issue. They don't make the code harder to understand and it all compiles.

Re: “Screw it, I'll make my own” – The story of a new programming language

#47
post #24
post #18

> There is a bit of a catch-22 in language design where the more a language is used, the clearer it becomes which parts of it are problematic and should change, but the harder it gets to actually change them. To hone a language you must use it, but applications require that a language's features remain stable, robust, set in stone, and therefore as imperfect as they were at that moment. Furthermore, the more delays a…

A nice solution was used during development of the Go language: a tool for code rewriting (it was called "go fix"). It allowed the language authors to quickly and easily transform large swaths of code in the standard library, and also let everybody execute the same transformations in any third-party code. Thus enabling rapid and extremely painless iterations. [I'm consciously simplifying the story a bit to make it sh…

Yeah, Python tried this as well with their 2to3 tool (https://docs.python.org/3.5/library/2to3.html), but their release bump was a little bigger than the Go prerelease changes (and the users not as flexible) so it wasn't much of a magic bullet.

Re: “Screw it, I'll make my own” – The story of a new programming language

#48
post #13

Curious. Are there examples of programming languages that allow spaces in identifiers? Obviously, it would need to be designed for that. I'm against the case-sensitive nature of some programming languages, and file systems for that matter. While it makes sense in a computing context (faster), you invent a new mode, just for the computer.. (Fortran was probably case-insensitive because upper-case letters were used fir…

Common Lisp allows spaces in identifiers and symbols names, but you have to quote it with vertical bars:

    (let ((|This variable has spaces| 1))
      (print |This variable has spaces|))

Re: “Screw it, I'll make my own” – The story of a new programming language

#49

Earlier quoted context omitted.

Case-sensitivity makes sense because it enforces uniformity of code. Case insensitivity only matters when you want to write identifiers differently at different locations. The only place where I see this could be useful is when you use a library that uses a different convention. The IMO better way to solve this is to set a convention for your programming language and enforce it with the compiler (at least with warnin…

> Case-sensitivity makes sense because it enforces uniformity of code. I don't see that case-sensitivity helps to achieve uniformity of code that much. Factors like code structure, common design patterns, and source code formatting are more important. The approach to the structure and design of an application or library is something that each individual development group decides for themselves. Source code formatting…

Reading Erlang is really nice partially because all variables are capitalized (enforced by the compiler). You know immediately which parts of the code are what.

It actually drives me a little nuts that I can't do the same thing in Elixir (compiler enforced lowercase) because so much of the code looks the same.

Re: “Screw it, I'll make my own” – The story of a new programming language

#50
post #3
post #2

[deleted]

> I don't understand why people would use a dash "-" inside a symbol No need to use the shift key. At the levels of efficiency that a good language can reach, this matters. Also, dashes match established lexicographical conventions better than underscores because dashes look like hyphens.

I'm all for efficiency but based on my experience reading the code people write, the last thing we need is getting them to type faster. I'd prefer if some people slowed down a whole heck of a lot to think more about what it is they're doing.
Post reply on HN