News for hackers. Stuff that matters.
Re:Get rid of those boolean function parameters (2015) by 10x-dev on Monday September 20, 2021 @08:04AM (#28592854)
> every bit of software that presents this program not only to understand my programming language

You can either change your program to fit existing tools, or you can build smarter tools. I prefer the latter.

> code itself is a presentation layer

Not for the tool it isn't

edit: I think we can all agree that ideally we fix this in the language itself by adding optional named parameters

Re:Get rid of those boolean function parameters (2015) by tsimionescu on Monday September 20, 2021 @08:10AM (#28592903)
No matter how smart the tool is, unless it can see the definition of the function, it can't guess the parameter name. Code is often shared on mail, chat programs etc, requring me to send compilable code snippets to get nice presentation out of a blob of text would be significant overkill...
Re:Get rid of those boolean function parameters (2015) by fxtentacle on Monday September 20, 2021 @06:56PM (#28600092)
Your IDE could automatically add those annotations as rich text or embedded HTML when you copy the source code out from the IDE into the E-Mail.
Re:Get rid of those boolean function parameters (2015) by tsimionescu on Tuesday September 21, 2021 @04:52PM (#28609776)
Would it be rich text when I copy to WordPad and HTML when I copy to a web page? Would it also support Markdown and maybe wiki ML? Would IntelliJ know that when I'm pasting code to an Emacs buffer in java-mode it should paste plain text, but when I'm pasting to an Emacs buffer that is an email, it should instead add org-mode annotations?

Overall this concept of copy/pasting with context is nice, but it only works for applications that have a defined API between them, such as MS Office OLE objects. In all other cases, pasting plain text is better than any "smart" solution.

Re:Get rid of those boolean function parameters (2015) by im3w1l on Monday September 20, 2021 @08:55AM (#28593281)
So your solution is to write code that is currently hard to read in the hope that someone will make a tool that presents it nicely in 10 years?