6 ms·
Show HN: Sabre – The bullshit-free (c) programming language
- jschveibinz 6y agoLong live FORTRAN, the original BS-free programming language...sort of, if you ignore that whole messy global variables thing and the messy input/output stuff, and...ah never mind.
- tluyben2 6y agoWell, for absolute beginners and non software engineers globals are really a major part of the non-BS part. Just throw stuff in to little named boxes and use where ever. There are many jobs which require programming but not software engineers where I see globals all the time: data science (jupyter), trading (mt etc bots), accounting (excel and 4gl hell) etc. These folks just 'get shit done' and do not care (or know) about scope. Only us pro software engineers get upset about as we know this will hurt down the line.
- itwy 6y agoThe thing is, scope isolation takes 10x the time of hunting for rare and obvious bugs caused by global variable usage.
- tluyben2 6y agoAbsolutely. Still, many people cannot be bothered, and so find it BS.
- TheRealKing 6y agoThere are occasions where globals cannot be avoided.
- gregmac 6y agoThe methods easy for beginners to build small systems and the ways experts use to build complex systems are often so different as to be totally incompatible. Think about it: It's exceedingly rare to find a language/framework where an early step in learning doesn't include "ok, now throw out everything you've done, here's how we really build real things."
- LittlePeter 6y agoIn my opinion, let num = 10 is not bullshit free, num = 10 is.
- garritfra 6y agoThat's highly subjective. I see where you're coming from, but I personally think that num = 10 is weird to read.
- protomyth 6y agoWell, there is an argument for := or <- for assignments.
- chordalkeyboard 6y ago> there is an argument Lol
- garritfra 6y agoI personally don't consider that syntax bs-free. When coming from another language, it's quite likely that you haven't encountered that syntax before.
- protomyth 6y agoAnyone who grew up with Pascal has seen := a lot. On a personal note, I do hate the overloading of =.
- eyelidlessness 6y agoIt’s not entirely subjective. For the majority of languages with a `let` keyword, it creates a binding which can’t be reassigned. JS is the only major language I’m aware of that breaks this expectation, and uses `const` instead. In fact, I had assumed Sabre followed the more common pattern, and was quite surprised to discover it doesn’t later in the docs. I think that’s a pretty clear case of “bullshit” in the sense described in the README.
- bokumo 6y agoYou can't copyright short phrases and slogans like "bullshit-free".
- eyelidlessness 6y agoI suspect it’s somewhat tongue in cheek. From the README: > A "bullshit-free programming language" is of course a highly subjective opinion I hardly think the author would believe the concept to be subjective and also believe they have a monopoly on the phrase’s usage.
- phabora 6y agoI read it as a strong statement that the author immediately cowered away from.
- mkl 6y agoTongue-in-cheek, yes, but the concerning bit is "(c)" instead of "(TM)". If they don't understand the (huge) difference, do they understand the licensing of their code?
- eyelidlessness 6y agoWhy is it concerning? Is someone gonna get hurt?
- mkl 6y agoMy concern is stated in the very next sentence. Most concerns people have, especially about software, copyright, and licensing, do not involve people getting physically hurt. Why would you jump to that conclusion?
- BoorishBears 6y agoThey were being factitious, a concept that apparently eludes you in multiple contexts. And your jump is laughable for multiple reasons: a) It's a poor application of logic to imply not knowing Copyright vs Trademark would affect their ability to use an off the shelf license like Apache License 2.0... The entire point of an off-the-shelf license like the one they used is to not require an understanding of the minutiae of copyright law b) You're wrong anyways, the phrase is not something that could be trademarked. Short phrases can be trademarked when they're "inherently creative" or have developed enough secondary meaning that they can be instantly tied to a product or service "bullshit-free" passes neither bar, so it can't be trademarked. Ergo you've actually shown that you yourself, do not know enough about licensing to be questioning their facetious use of the copyright mark. It's laughable you'd try to question that at all honestly.
- barrenko 6y agoWe can't go back to C people.
- 29athrowaway 6y agoIt is likely that a significant part of your hardware firmware, your operating system, the programming languages that you use, the applications you use are implemented in C. Simply put, if you work with computers for a living, C helps feed your family.
- barrenko 6y agoI meant there's no need to keep trying to reinvent C, not that there's anything wrong with actual one.
- deleted 6y ago[deleted]
- deleted 6y ago[deleted]
- vincent-manis 6y agoThe author says it's a toy language, but, given the name, it must at least be useful for writing airline reservation systems, right?
- mtnygard 6y agoSpeaking as someone working at Sabre, I can say that this language has no connection with this company.
- deleted 6y ago[deleted]
- Groxx 6y agoI applaud the general goal (easy to understand for everyone makes a great educational language), but there doesn't really seem to be enough here to provide feedback. The runtime may do more than is documented currently, but the docs don't seem to describe a full language yet. E.g. there's an "any" type, but no way to inspect types. There is an "integer" type that holds... decimal numbers? That's possibly accurate, as there is no other number type. There's type inference mentioned once in the variables doc, but I didn't see it anywhere else so I have no idea if it only works with literals, or if there's inference anywhere.
- garritfra 6y agoThanks for your feedback. Sabre is currently a hobby project of mine. It is not fully thought out yet, and I'm learning a lot while designing the language. I must admit that Sabres type system at this stage is really vague, given that the currently targeted language is JavaScript. It's definitely something I want to improve in the future.
- young_unixer 6y ago> Bullshit free > let num = 10 That's bullshit. We don't need more languages trying to hide types. We need a good statically and strongly typed language. int32 num = 10; There you go, much better.
- nesarkvechnep 6y agoSo statically typed languages which do type inference e.g. Haskell, OCaml and Standard ML are bullshit?
- karmakaze 6y agoI was expecting something that looked more like Python rather than C without (explicit) types.
- ncmncm 6y ago> "... a C backend is currently under development." Slightly off-topic: I always wonder about the difference between "currently under development" and "under development". What is this extra word trying to tell us? Often when I find redundant words like this in writing, they seem to be trying to reassure the writer that what they are saying will be believed. A thing is described as "important" when it really is, and "incredibly important" when the writer wants us to believe it is, but knows the evidence won't be enough to persuade us. Writing manuals advise "intensifiers weaken", meaning when you use an adverb to try to emphasize a quality, they actually raise doubt instead. This word "currently" seems to be acting in the role of an intensifier, but it is odd because it isn't one. Now, to be clear, I don't actually doubt that the C backend is under development. Saying "currently" all the damn time is a sort of tic that many IT people have developed that you hear repeated more when they are nervous. What it implies, literally, is that it either wasn't, recently, or might not be anymore, soon; or both. But usually that is not what the speaker means to suggest. Middle managers have different tics when they are actually lying to you. (Some people would say it when they open their mouths, but that is uncharitable.)
- blt 6y agoMost people do not write as economically as possible. I would not read too much into it.
- smitty1e 6y ago> The Sabre compiler emits JavaScript for the Node.js runtime Does this mean the JVM is BS?