[HN Gopher] Show HN: Sabre - The bullshit-free (c) programming l...
       ___________________________________________________________________
        
       Show HN: Sabre - The bullshit-free (c) programming language
        
       Author : garritfra
       Score  : 23 points
       Date   : 2021-02-20 18:42 UTC (4 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | vincent-manis wrote:
       | The author says it's a toy language, but, given the name, it must
       | at least be useful for writing airline reservation systems,
       | right?
        
       | barrenko wrote:
       | We can't go back to C people.
        
         | 29athrowaway wrote:
         | It 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.
        
           | [deleted]
        
           | barrenko wrote:
           | I meant there's no need to keep trying to reinvent C, not
           | that there's anything wrong with actual one.
        
       | jschveibinz wrote:
       | Long 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 wrote:
         | Well, 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 wrote:
           | The thing is, scope isolation takes 10x the time of hunting
           | for rare and obvious bugs caused by global variable usage.
        
             | tluyben2 wrote:
             | Absolutely. Still, many people cannot be bothered, and so
             | find it BS.
        
       | bokumo wrote:
       | You can't copyright short phrases and slogans like "bullshit-
       | free".
        
         | eyelidlessness wrote:
         | I 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.
        
         | sergiomattei wrote:
         | It's meant to be humorous(tm).
        
       | [deleted]
        
       | Groxx wrote:
       | I 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 wrote:
         | Thanks 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.
        
       | LittlePeter wrote:
       | In my opinion, let num = 10 is not bullshit free, num = 10 is.
        
         | garritfra wrote:
         | That's highly subjective. I see where you're coming from, but I
         | personally think that num = 10 is weird to read.
        
           | eyelidlessness wrote:
           | It'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.
        
           | protomyth wrote:
           | Well, there is an argument for := or <- for assignments.
        
             | chordalkeyboard wrote:
             | > there is an argument
             | 
             | Lol
        
             | garritfra wrote:
             | I 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.
        
         | carapace wrote:
         | Variables are overrated. 10 is BS-free.
        
         | [deleted]
        
         | steve_taylor wrote:
         | Implicit declaration is bullshit. It allows new variables to
         | accidentally be created out of typos.
         | 
         | Sabre should have gone with var. Without knowledge of existing
         | languages, the meaning of let isn't exactly obvious.
        
           | tines wrote:
           | I'd say that a knowledge of mathematics is where the meaning
           | of "let" will most often come from. I'm sure we've all read
           | things like "Let x be the speed of a train..."
        
       | young_unixer wrote:
       | > 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.
        
       ___________________________________________________________________
       (page generated 2021-02-20 23:01 UTC)