DEV Community


Discussion on: Language Features: Best and Worst

isaacrstor profile image
Isaac Yonemoto

For your first suggestion, I would seriously give this talk a watch, and learn from the very well-fought struggles of another PL:

I think julia's typesystem is quite fascinating, because it's used in a totally different way from pretty much every other PL.

Elixir is a language that really optimizes for programmer joy, one of the best PL features is the pipe operator.

I can do this:

result = value
|> IO.inspect(label: "value")
|> function_1
|> IO.inspect(label: "result 1")
|> function_2(with_param)
|> IO.inspect(label: "result 2")
|> function_3
|> IO.inspect(label: "result")

instead of:

println("value: $value")
r1 = function_1(value)
println("result 1: $r1")
r2 = function_2(r1, with_param)
println("result 2: $r2")
result = function_3(r2)

Indespensable for easy-to-read code and println debugging.

awwsmm profile image
Andrew (he/him) Author

That is pretty neat. Thanks for the suggestions! I'll check out that video ASAP.

Forem Open with the Forem app