"Indentation significant syntax" :( in my opinion, one of the worst ideas to plague many new languages brackets are really, seriously, honestly a better visual cue for grouping
Idris, a language that will change the way you think about programming (2015)
11–20 of 101 posts
Re: Idris, a language that will change the way you think about programming (2015)
#12"Indentation significant syntax" :( in my opinion, one of the worst ideas to plague many new languages brackets are really, seriously, honestly a better visual cue for grouping
There is no objective best answer here. I vastly prefer indentation based grouping, but I respect that you don't.
Re: Idris, a language that will change the way you think about programming (2015)
#13"Indentation significant syntax" :( in my opinion, one of the worst ideas to plague many new languages brackets are really, seriously, honestly a better visual cue for grouping
These are functional languages, and there isn't a lot of code to chunk together with brackets. Functions are often just one line, and it's a bit cumbersome to make functions that require multiple lines. Do you believe brackets add to the readability of a one line function?
Re: Idris, a language that will change the way you think about programming (2015)
#14"Indentation significant syntax" :( in my opinion, one of the worst ideas to plague many new languages brackets are really, seriously, honestly a better visual cue for grouping
For example, what's the editing experience like compared to e.g. OCaml with emacs/Merlin? Is there anyone in a position to compare 1ML's approach to unifying type/value languages vs using dependent types?
Re: Idris, a language that will change the way you think about programming (2015)
#15"Indentation significant syntax" :( in my opinion, one of the worst ideas to plague many new languages brackets are really, seriously, honestly a better visual cue for grouping
int func()
{
while dosomething()
{
dosomething()
dosomething()
doanotherthing()
}
dosomething()
}
def func():
while dosomething():
dosomething()
dosomething()
doanotherthing()
dosomething()Re: Idris, a language that will change the way you think about programming (2015)
#16"Indentation significant syntax" :( in my opinion, one of the worst ideas to plague many new languages brackets are really, seriously, honestly a better visual cue for grouping
There's nothing about braces that ensures visual cues to nested code. Significant whitespace does precisely that. And eliminates brace placement arguments. int func() { while dosomething() { dosomething() dosomething() doanotherthing() } dosomething() } def func(): while dosomething(): dosomething() dosomething() doanotherthing() dosomething()
A machine can look at the braces and re-indent the code, so that you don't have to look at the braces. All while you rest assured that the meaning didn't change:
I just popped it into Vim, selected all and hit =:
int func()
{
while dosomething()
{
dosomething()
dosomething()
doanotherthing()
}
dosomething()
}
Some semicolons are expected so things are a little off.Re: Idris, a language that will change the way you think about programming (2015)
#17 app : Vect n a -> Vect m a -> Vect (n + m) a
That is pretty amazing if you ask me. I look forward to the day when we all use languages which save programmers from themselves.Re: Idris, a language that will change the way you think about programming (2015)
#18Re: Idris, a language that will change the way you think about programming (2015)
#19 func train_model(X: [n d], y: [n 1])
So many lines of code are spent verifying that the sizes of two function arguments are compatible.Re: Idris, a language that will change the way you think about programming (2015)
#20app : Vect n a -> Vect m a -> Vect (n + m) a That is pretty amazing if you ask me. I look forward to the day when we all use languages which save programmers from themselves.