5 ms·
How is "subtract a, 3" better than "a-3"? I can already feel my carpal tunnel acting up!
by antiquark 11y ago
How is "subtract a, 3" better than "a-3"?
I can already feel my carpal tunnel acting up!
- FenugreekAcerb 11y agoSome say (for example Moore) that arithmetic is only a tiny part of programming and don't deserve special syntax (especially with a language that lacks C-style for loops).
- Terr_ 11y ago...Well, a tiny part of whose programming? Programming languages (at least the not-so-academic kind) need to mesh with the problem-spaces being solved, and there are definitely some contexts where most of the work is encoding and applying arithmetic rules.
- ktRolster 11y agoReally all you need for programming are > < + - . , [ ] Anything more than that is for wimps. Brain is the only language I ever program in.
- slang800 11y agoI think you mean "Brainfuck", I can't find a programming language called "Brain".
- ktRolster 11y agoI haven't been posting here long, so I wasn't sure if it was acceptable to type 'fuck.' So I self-censored by replacing it with asterisks, which hackernews promptly ate. So yes, you are right of course.
- akkartik 11y agoEach pair of asterisks turned into an empty italic block due to HN's formatting rules. You can see them if you view source :)
- akkartik 11y agoIt translates to assembly/machine code with a lot less code. I don't need a compiler, I don't need to write optimizations.[1] I actually don't consider Mu to be a language. (I'm the author.) It's a low-level starting point to explore ways to make the standard OS primitives more testable. I don't need it to look nice. Higher level languages can come later, once the foundations are in place. I actually am growing increasingly suspicious of all our navel-gazing about syntax. We spend all our time in places like HN thinking about how to make small screenfuls of code look nice, but all that effort hasn't really translated into helping me understand the large-scale structure of random open-source codebases more easily. Perhaps one way to think about it is that syntax helps insiders keep a codebase in their head. I'm more concerned with ways to help more outsiders import a codebase in the first place. Because people leave and move on, and it's very hard for software projects today to improve once their original authors move on. More on this: http://akkartik.name/post/readable-bad http://akkartik.name/post/readable-bad (I'm susceptible to carpal tunnel, but it hasn't become a bigger issue. I take wrist breaks.) [1] I can even imagine doing the translation in machine code, so that Mu then becomes self-hosting without needing any of the current stack. I might go down that road..
- skewart 11y ago"I'm more concerned with ways to help more outsiders import a codebase in the first place." This. The pain point that mu addresses is huge. I haven't really looked at the project in much depth yet, or played around with it, but I love that you are tackling this issue. I have spent way too much time wandering around a big code base trying to build mental models of what's going on, and thinking to myself the entire time "there's got to be a better way."
- chipsy 11y agoThis kind of consideration has led me down the road towards XML, because it's the syntax that is powerful enough to model documents that bundle a mix of schemas(including source formats with their own idiosyncratic syntax). It is not a syntax anyone wants to type in or read, but that one advantage counts for a lot, given the right problem domain, because it pushes the semantic content to the center.
- 11y ago