Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming Microsoft

Microsoft Debuts Bosque, a New Programming Language With No Loops, Inspired by TypeScript (theregister.co.uk) 261

Microsoft has introduced a new open source programming language called Bosque that aspires to be simple and easy to understand by embracing algebraic operations and shunning techniques that create complexity. From a report: Bosque was inspired by the syntax and types of TypeScript and the semantics of ML and Node/JavaScript. It's the brainchild of Microsoft computer scientist Mark Marron, who describes the language as an effort to move beyond the structured programming model that became popular in the 1970s. The structured programming paradigm, in which flow control is managed with loops, conditionals, and subroutines, became popular after a 1968 paper titled "Go To Statement Considered Harmful" by computer scientist Edsger Dijkstra. Marron believes we can do better by getting rid of sources of complexity like loops, mutable state, and reference equality. The result is Bosque, which represents a programming paradigm that Marron, in a paper he wrote, calls "regularized programming."
This discussion has been archived. No new comments can be posted.

Microsoft Debuts Bosque, a New Programming Language With No Loops, Inspired by TypeScript

Comments Filter:
  • I hate code-and-pray (Score:4, Interesting)

    by kimgkimg ( 957949 ) on Friday April 19, 2019 @01:30PM (#58460338)
    Okay, so it's "simple and easy to understand", but how debugable is it?
  • by QuietLagoon ( 813062 ) on Friday April 19, 2019 @01:36PM (#58460384)
    Pick two.
  • by Anonymous Coward on Friday April 19, 2019 @01:40PM (#58460406)

    There will likely be job offers in the next few weeks asking for a couple years of experience with this new programming language.

    • by The_Dougster ( 308194 ) on Friday April 19, 2019 @01:49PM (#58460472) Homepage

      And there will be people applying with 5 years experience already too :P

      • I heard the story about someone who had started working with Ruby on Rails right as it was first released. He applied for a job working with it, and they asked for some number of years experience, which was like a year more than he had. He applied anyway, and when he was rejected for someone with more experience, he challenged them--who possibly had more experience with it than he did, since he had worked with it since release. Answer: The guy who wrote it. I don't know if this was true or not, but it

    • =D

      no mod points, so have a smiley. happy friday.

    • I've concluded that a job posting requiring years of experience with a weeks- or months-old technology have three aims:

      1. IT wants someone with however many years of experience with programming languages in that paradigm, including at least some experience with the language in question. But HR got confused when it worded the job posting.
      2. It's an excuse to poach someone who worked on the technology before it was first published. For example, "3 years experience with Java" when Java was 2 months old means "

  • The Functional Trap (Score:5, Interesting)

    by TechyImmigrant ( 175943 ) on Friday April 19, 2019 @01:47PM (#58460452) Homepage Journal

    You revel in the joy of freedom from end effects and state errors.

    Then you come up against a brick wall - "How the hell do I do that in a functional language?"
    I have a book called "Functions Data Structures". It's actually a book on all the data structures that you cannot implement in a function language.
    Before long you cheat and link in a loop with a conditional in C just to remain sane.

    I've had great success with functional languages where the target domain is functional - E.G. Functional HDLs like confluence. Digital logic is functional. You can describe it functionally and it's way better than System Verilog.

  • by paulxnuke ( 624084 ) on Friday April 19, 2019 @01:52PM (#58460484)

    Admittedly I haven't delved into it very far yet, but this looks like a standard functional language. The ideas he talks about have been around for ages. That does mean I am confident that they work, more so than the usual "new paradigm".

    Haskell that compiles is a lot closer to working than C would be; getting it to compile is a lot harder (debugging takes place before running) and getting that last few percent (correct output) can be a massive pain: not being able to crash doesn't always help to find problems, especially without a useful debugger. Does Bosque improve on that? Does it have a good FFI (a common failing)? Can it support UI's (huge pain with most functional languages; workarounds are mostly ill-fitting bandaids.)

    I'm trying to find a reason to care here.

    • FFI = foreign function interface
    • My company has some legacy Haskell code, written by a couple of programmers who were die-hard evangelists for the language. The irony is, they wrote TERRIBLE code, hard-coding constants that should have been configuration settings, hard-coding HTML and SQL strings, and everything else you can think of. I hope there are better Haskell programmers out there, because what I've seen...stinks.

  • It appears that it does not get rid of loops per se, it changes the syntax of the loop structure.
  • by dark.nebulae ( 3950923 ) on Friday April 19, 2019 @01:56PM (#58460508)

    Seriously?

    v |> filter(fn(x) => x != none) |> map[Int](fn(x) => x*x)

    WTF? I hardly call that simple to understand...

    • by Dutch Gun ( 899105 ) on Friday April 19, 2019 @02:18PM (#58460648)

      It's the sort of thing that programming language designers seem to love. I've never understood the apparent loathing they have for simple, readable loops. I think maybe because loops are "conceptually" ugly, albeit infinitely practical. So, they keep trying to refine them into something more elegant, but IMO, end up making things more complex and opaque.

      • The functional notation can be *proven* correct in the compiler. There's a whole host of error states that simply cannot occur within the syntax. Loops introduce state aspects that result in run time failures. That's why language designers continue to try to remove them as much as possible.
      • by dacut ( 243842 )

        It's the sort of thing that programming language designers seem to love. I've never understood the apparent loathing they have for simple, readable loops. I think maybe because loops are "conceptually" ugly, albeit infinitely practical. So, they keep trying to refine them into something more elegant, but IMO, end up making things more complex and opaque.

        This seems to yearn for the FORTRAN era-definition of simplicity, which meant "it looks like a mathematical statement" to language designers. I suppose, if you were giving a math lecture, v |> filter(fn(x) => x!= none) |> map[Int](fn(x) => x*x) could stand in for, "Let v(<X>) => <Y> map all non-nil elements to their squared integral equivalents" or somesuch. (I'm being sloppy with notation here because it's been years, I'm busy, and I kinda noped out of the Bosque README.md docume

      • As someone who does both C++ and Erlang, loopless languages have a very simple advantage: the loop variables are only changed at the end of the loop or the loop is made using a lambda inside a function with a predictable behavior.

      • by jma05 ( 897351 )

        Don't knock it till you try it.

        This works quite well when you are applying several transformations on collections.
        At that point, loops start to feel like GOTOs.
        There are also other benefits. In some languages, you can effortlessly parallelize streams written fluently like this.

        Other post: https://developers.slashdot.or... [slashdot.org]

    • by ceoyoyo ( 59147 ) on Friday April 19, 2019 @02:18PM (#58460654)

      Depends on whether you're a perl programmer or not.

      • Comment removed based on user account deletion
        • by ceoyoyo ( 59147 )

          Slashdot is a technical discussion site. You should know what Perl [wikipedia.org] is. You could also very easily Google it.

          When you're interacting with a community, it's important to know how to speak the language, or at least being willing to learn.

    • oh I see ... map (and grep) two old Perl paradigms that I have loved.

    • by jma05 ( 897351 )

      I find that simpler, more natural and "fluent".
      It cognitively scales much better to read linearly, left to right, than nesting.
      It is not a good fit for everything, but this approach is quite common in data analysis code. You get used to it quite quickly.

      map, filter, curry and a pipe operator are bliss when you are doing a long series of transformations. Very compact too.

      R community switched to dplyr. Everyone seems to love it.
      https://github.com/hadley/dply... [github.com]

      Python has some libraries, minus the operator.
      But

    • You're clearly not a real programmer if you can't understand that. Why, any monkey could have written that code! (Maybe one did!)

  • by mykepredko ( 40154 ) on Friday April 19, 2019 @01:58PM (#58460520) Homepage

    As I read through the description of the language in the overview.md, it seems to me that Marron took the things that he didn't like about existing languages and changed them into something he does without consulting anybody.

    So where is it is less complex for him, it seems like it will be more complex (and unnatural) for the rest of us.

    • He's trying to eliminate _unintended_ complexity, the kind of complexity that comes by having to use language elements that don't directly contribute to solving the problem, they are essentially just scaffolding upon/through which solves the actual problem. One example is looping semantics. In other languages, you have to write some scaffolding to marshal up the items in the thing you're iterating through, and then there's what you want to do with each item. He says he studied all the different kinds of thi

    • Did you look at the hideous Tic-Tac-Toe example [github.com] ?

      const winPositionOptions: List[List[[Int, Int]]] = List[List[[Int, Int]]]@{
      List[[Int, Int]]@{ @[ 0, 0 ], @[ 0, 1 ], @[ 0, 2 ] },
      List[[Int, Int]]@{ @[ 0, 1 ], @[ 1, 1 ], @[ 2, 1 ] },
      List[[Int, Int]]@{ @[ 0, 2 ], @[ 1, 2 ], @[ 2, 2 ] },

      List[[Int, Int]]@{ @[ 0, 0 ], @[ 1, 0 ], @[ 2, 0 ] },
      List[[Int, Int]]@{ @

  • by mykepredko ( 40154 ) on Friday April 19, 2019 @02:02PM (#58460540) Homepage

    The more I read of the overview and see people's comments, the more it reminds me of APL (https://en.wikipedia.org/wiki/APL_(programming_language))

    Maybe it will be efficient to write but I don't see it being easy to read/follow/debug.

  • by 140Mandak262Jamuna ( 970587 ) on Friday April 19, 2019 @03:01PM (#58460958) Journal
    On seeing the peacock in the forest fan its tail feathers and dance beautifully, the common grouse too unfurled its pathetic little feathers ... So goes the well known simile from the Tamil literature. I am reminded of it seeing Marron ape Dijkstra.
  • Looks like a badly thought out functional language.
    Just use haskell or one of the other existing ones. Hey, MS already has their own called F#, why not use that?
  • I thought obscure special characters as operators and sigils like @ had died with PERL? And what actually is var! supposed to mean, or more precisely: var without the ! ? (Yeah I know what it means ... var is a variable which is constant, so much to "variable" and var! declares a variable you actually can modify ... silly )

    However: I like the name :P

  • This looks like a refresh of LISP/Scheme. Before they eventually added loops. They used tail recursion for iteration.

"If it ain't broke, don't fix it." - Bert Lantz

Working...