News for hackers. Stuff that matters.
Re:PlsExplain: A small dynamic programming language where ev... by BulgarianIdiot on Monday August 23, 2021 @04:56AM (#28273639)
> This is a fun idea, but it generates comments that are typically the ones which should not exists in actual code, because they do not add any useful information

The point is attaching meta info to values which aren't pointless. Say:

    weight = 42 /* pounds */;
It's kinda like types, but without the type checks. I'm not purely sarcastic, because boxing values within objects so they have a type has drawbacks.

That said, there are better way of typing values without boxing them.

Re:PlsExplain: A small dynamic programming language where ev... by sparsely on Monday August 23, 2021 @07:41AM (#28274408)
F# does exactly this, except it understands the rules of units cancelling etc.
Re:PlsExplain: A small dynamic programming language where ev... by Anunayj on Monday August 23, 2021 @11:31AM (#28277383)
Woah TIL. I've been looking for a similar language, something that I can do Physics in without having to worry about units/constants. Till now I've used WolframAlpha or just Google. Do you think F# is suited for this, or do you suggest other alternatives?
Re:PlsExplain: A small dynamic programming language where ev... by sparsely on Thursday August 26, 2021 @09:55AM (#28314964)
F# definitely has the most complete implementation that I've seen, I'm sure other languages would let you hack something together though.

https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe...