3 ms·
>If you're unsure, that's ok. You can put a question mark at the end of a line instead. It prints debug info about that line to the console for you. Man, I lov
by stevage 3y ago
>If you're unsure, that's ok. You can put a question mark at the end of a line instead. It prints debug info about that line to the console for you.
Man, I love this idea. Imagine if in JavaScript, you could just add a `?` to a line to print out the value of all variables and expressions referenced. Or `?` on a line by itself to print out the value of all variables in scope.
> DreamBerd has significant whitespace. Use spacing to specify the order of arithmetic operations.
I might be mad, but this seems...almost...useful?
- taneq 3y agoOnly if you want to replace the current somewhat-arbitrary set of operator precedence rules with an equivalent set that's just as arbitrary but that you also can't see. :P
- l0b0 3y agoPretty sure I've seen spacing used as precedence indicators in a scientific setting. It does feel like it would be useful, except it would be a nightmare with more than one level of overrides.
- mananaysiempre 3y agoThere was a research language that used it like that, yes, but I can’t find it now :(
- chaboud 3y agoProbably Sun Fortress? It’s like someone lost one bet and then won another, and, resultantly, humanity lost… https://en.m.wikipedia.org/wiki/Fortress_(programming_language) https://en.m.wikipedia.org/wiki/Fortress_(programming_langua...
- nyanpasu64 3y agoI would be quite happy if you could add a single character in a function definition to log the function name and all arguments on call, and function name at time of return. I spend a substantial amount of time manually adding logging to unfamiliar or malfunctioning code, and this would improve (not eliminate) the difficulty of doing so.
- humbugtheman 3y ago> Man, I love this idea. Imagine if in JavaScript, you could just add a `?` to a line to print out the value of all variables and expressions referenced. Tomorrow is today: https://twitter.com/TodePond/status/1595464031728459776 https://twitter.com/TodePond/status/1595464031728459776
- stevage 3y agoThis is kind of genius! :) In library form: https://todepond.gitbook.io/habitat/documentation/console https://todepond.gitbook.io/habitat/documentation/console
- egeozcan 3y agoReminds me of the .Dump() extension in LinqPad, which I love https://www.linqpad.net/CustomizingDump.aspx https://www.linqpad.net/CustomizingDump.aspx
- marssaxman 3y agoI love the inclusion of "actually, that sounds kind of nice" elements within the stream of absurdity: defining restricted string types via regular expressions caught my eye...