Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, I am not saying it is a big thing. It's a small thing in itself, but breaking backwards compatibility for no good reason is huge red flag for the future.


> breaking backwards compatibility for no good reason

I'd say reducing weird syntax is a perfectly good reason. How is doing this while offering an easy migration solution in an early stage language a "huge red flag"?


A prime as an identifier constituent is not "weird syntax". The ancient C tradition of only allowing [_[:alnum:]] characters in identifiers is pretty pointless anyway. I really wish more languages would allow question marks and exclamation marks (and everything else), the way Lisp and Scheme do (e.g., https://docs.racket-lang.org/guide/syntax-overview.html#%28p...)

There's a very good example in C++ of how this causes problems, where vector::clear and vector::empty are much too easy to confuse (which one of them deletes all elements, and which one of them checks if a vector is empty?). Replacing them with clear! and empty? (or is it clear? and empty!) would be a huge improvement. Whenever a language moves away from arbitrary legacy restrictions, that's a good thing.


The problem is that prime (as it's used, anyway) doesn't carry any meaning the way ? and ! (as they are used) do in Scheme, it's just used for "I couldn't bother to think of another name". Enabling clearer names is great, but the language allowing primes in names was accomplishing the opposite of that.


I think that's a coding style decision, and shouldn't be part of language specification. I certainly don't feel about primes the way you do: having a function f and a function f' usually means they are sort of similar with some specific difference between them, definitely not "couldn't think of a better name". E.g., in haskell a prime often denotes a strict function, it's a better convention than having f and f_strict. Plus, how are you going to decide which unicode symbols should not be allowed? It can get a little random.


It's definitely a matter of taste, but I feel like settling for "similar except different somehow" is the same thing as "couldn't think of a better name". I would much prefer f-strict because then I don't need to be familiar with the punctuation conventions of the codebase to know how it's different from f, it's right there in English.

Edit: Plus, then you don't have to wonder if that particular function follows that naming convention; prime meaning strict isn't nearly as universally followed as ? or ! in Scheme, for instance.


In Haskell it's sometimes (often?) used for strict versions of functions e.g. foldl and foldl'.


it's a convention in ML languages, for a name whose value has been modified


> early stage language

I keep hearing this excuse, and to be honest I don't like it. On one hand we want to expand the usage of Elm, and have Elm be taken seriously, on the other hand when we feel like we use the "early stage" language excuse.

> I'd say reducing weird syntax is a perfectly good reason

I disagree with you on this, prohibiting the users from using the prime character has nothing to do with the language's syntax.


> On one hand we want to expand the usage of Elm, and have Elm be taken seriously, on the other hand when we feel like we use the "early stage" language excuse.

If I didn't know what changes we're referring to, it would sound like there was some critical change to the core functionality of the language.

Instead, they're removing one weird bit of syntax. It's not an excuse that it's an early stage language - it's acknowledging reality. And an upside to that reality is that making these types of changes won't upset nearly as many people as it would if it were a more mature language.

> I disagree with you on this, for me it is very worrying.

You're not explaining why. Here (https://github.com/elm-lang/elm-plans/issues/4) are three good arguments for removing it:

1. It confuses newbies.

2. It's an easy character to miss.

3. It's easy to migrate away from it.

What are your arguments for keeping it besides the fact it's already there?


> it would sound like there was some critical change to the core functionality of the language

No, I acknowledged early on, and many times, that it is a very minor thing. My only concern is that it is worrying for the future. (Using the word huge in the "huge red flag" was an exaggeration. I shouldn't have done so).

> 1. It confuses newbies.

Remove it from core language then. Having the prime character in my code, doesn't confuse anyone but me.

Is a language that allows Unicode characters for variable names confusing for newbies?

> 2. It's an easy character to miss.

Again, it is in my code.

> 3. It's easy to migrate away from it.

That's not an argument for removing something.

Again, my point is that is has to do with personal taste, yet Evan decided to force it to anybody who uses the language.

He could have very easily enforce it to core packages, and nobody would complain. But forcing it on my code, is worrying.


> Remove it from core language then. Having the prime character in my code, doesn't confuse anyone but me.

Until you take your personal style to Github, or coworkers...

Evan is doing a pretty good job at managing Elm – in fact I don't know any other language except maybe Swift where the rollout is planned to such a depth.


If coworkers are unhappy with it, they can (and should) make guidelines for acceptable syntax. This is no different than using camel case in Java instead of snake case (or using the $ in identifiers, which is extremely rare). If it's a problem to use it in my code on Github, you can always use somebody else's code or fork mine to change it. Maybe we should use the compiler to force every line to have a comment so we don't have any undocumented code on Github too?


This is what I find troubling about Elm.

The creators see it appropriate to enforce their strange preferences with dubious reasoning. The enforcement (in standard Elm format) of a 4-sized tab[1] is just another example.

Like you said I'd not have the language community enforce what is acceptable down my throat, and that conflict of preferences within a team is best solved by making style guidelines instead of having the language community spoon-feed an authoritarian preference.

[1] https://github.com/avh4/elm-format/issues/210


I completely agree with you. Evan isn't happy just controlling what packages you can publish that use the native api on package.elm-lang.org, or what you can do in the language since the removal of signals, he wants to control even minute things like whether you use a fucking prime in a function name in your own code. It's ridiculous.


Before you reach a 1.0, you should be able to break backward compatibility for any and no reason.

Most likely the reason is that you want to make something that you yourself are proud of or at least satisfied with.

Unless you're being paid for the project, satisfying your psychological goals should be the prime point of pre-version 1.0 software.


It's not at 1.0, there's no promise about preserving backwards compatibility at this point.


See my reply to the other thread.

1. If it is not ready for prime time, maybe we should stop promoting it?

2. React was 0.14 up to a year or so ago. The number doesn't mean anything.


> prime time

Apparently, prime time came and went :)

> If it is not ready for prime time, maybe we should stop promoting it?

It's about as ready as the impression it makes: yes, you can use it for project. But you may need half an hour every few months to update.


> Apparently, prime time came and went :)

:D. Pun was not intended!


People are excited by it, and managed to deal with prime-ageddon without any major headaches (it's like basic regex search and there's even an update tool, come on).




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: