Re:Show HN: Dependently typed language for proofs that you c...
by rowanG077 on Sunday October 03, 2021 @02:55PM
(#28739592)
As long as types can only be a single identifier both are fine. But that is not the case very often. Look at C and it's derivates. It's just unreadable in those cases compared to separating type and value with a colon.
Re:Show HN: Dependently typed language for proofs that you c...
by Zababa on Sunday October 03, 2021 @01:43PM
(#28738969)
The order is one thing, but for me, it's the addition of a colon to separate the two properly that's important. That's probably also highly subjective as some people find syntax highlighting useless and I think it's great, but in general I like having a bit more tokens to know where I am.
Re:Show HN: Dependently typed language for proofs that you c...
by lapinot on Sunday October 03, 2021 @08:51AM
(#28736809)
Obviously highly subjective, yet heavy of conventions. Usually the subject comes before the qualification. "counter is an integer", "let counter be an integer" instead of "from the integer take counter".
Re:Show HN: Dependently typed language for proofs that you c...
by Zababa on Sunday October 03, 2021 @01:49PM
(#28739010)
Programming languages aren't natural languages though, and I don't think they should be forced to look like them.
One thing for the "type before name" camp is that you don't have to use a keyword like "let" or "function" when declaring a function, but on the other hand you're going to introduce a keyword anyways if you add type inference.
Re:Show HN: Dependently typed language for proofs that you c...
by dllthomas on Tuesday October 12, 2021 @08:46PM
(#28846921)
"We have an integer called x, ..."
Re:Show HN: Dependently typed language for proofs that you c...
by DemocracyFTW on Sunday October 03, 2021 @11:39AM
(#28738010)
You say "Nixon is a President" but also "President Nixon".
This is highly subjective. I find the latter to be far more readable. Reading a variable name knowing it's type makes more sense.