6 ms·
The Big Bang project aims to create a typed language with the feel of scripting
- pg_is_a_butt 11y ago"we're going to add another layer of magic to a programming language, and result in better than python executables" sure you are. cute.
- brightball 11y agoDoesn't Go basically accomplish that via near instant compile time?
- NhanH 11y agoNot quite, polymorphism is a bit iffy in Go (there is interface, and it's doable but not great). Type inference is extremely limited (this is also due to a weak type system, with comparison point being ML-family languages for examples) . Global type inference is off the picture without generic/ polymorphic typing. I don't think Go achieves the look and feel of working with Python and the like.
- s3nnyy 11y agoThe go philosophy is that inheritance "does not scale" and they deliberately went another route: https://golang.org/doc/faq#inheritance https://golang.org/doc/faq#inheritance
- mtrn 11y agoYes, one of the design goals was to blur the gap between dynamically and statically typed languages by creating a language that is safe to run and fast to compile, read and write.
- djur 11y agoGo doesn't have type inference "even at module or function boundaries"; this aims to.
- niccaluim 11y agoIn my mind, any language that demands a package declaration and a main function doesn't qualify as a "scripting" language.
- eru 11y agoThat's pretty minor, and could be almost trivially rectified with a preprocessor.
- vfclists 11y agoUse Nim
- tomp 11y agoDoesn't Nim require types (e.g. for function arguments)?
- jboy 11y agoIn Nim, you can use the type `auto` for proc parameters & return types: http://nim-lang.org/docs/manual.html#types-auto-type http://nim-lang.org/docs/manual.html#types-auto-type When you use the `auto` type, the compiler will infer the type automatically from the context of the proc invocation or from the proc body. The inferred types can be different for the different parameters. So you can have a proc declaration that looks like: proc inferTypes(a, b: auto) # `a` & `b` can accept different argument types Within a proc, you can also create bindings & variables without needing to specify a type: let iBinding = 1 var fVariable = 1.2 The following typeless code will compile & run without any complaints or problems: import strutils # `%` operator proc inferTypes(a, b: auto) = echo "$1 $2" % [$a, $b] proc main() = inferTypes(25, 30) inferTypes(1, "hello") inferTypes(4.4, 7) inferTypes("cat", 9.5) main() When the above code is compiled & run, it will produce the following output: 25 30 1 hello 4.4 7 cat 9.5
- jerf 11y agoHow does Nim hold up if you put "auto" everywhere you possibly can in a non-trivial program? (Tone note: Straight question. I have no idea and am honestly interested.) Context: Type inference is hard. Hindley-Milner is famous for making it possible, but the farther you stray from it, the harder it gets to do with no human-added annotations. I hope the authors of "Big Bang" are intimately familiar with the issues involved or they're going to be in trouble. If they aren't they ought to correct that. I'd also suggest that the Haskell community would be happy to share their experiences on that front if they are asked, and unless the authors are already experts, they really really should ask. Only good things can come from asking.
- gaius 11y agoSomeone beat you to it https://donsbot.wordpress.com/2010/08/17/practical-haskell/ https://donsbot.wordpress.com/2010/08/17/practical-haskell/
- mamazmaz 11y agoHaskell has an equational type system, and doesn't support subtyping in the same way that big bang does. (Disclaimer I'm working on big bang, so I'm a bit biased)
- m0th87 11y agoI feel like this is the direction Julia is going in. It's in this interesting space between statically and dynamically typed languages - technically it's dynamically typed, but you get a lot of the safety and performance guarantees afforded by static type systems through Julia's aggressive type inference [1]. As the type system gets richer, it should only get better on this front. If you haven't checked out Julia yet, it's a beautiful language. There's a reason why Graydon (the guy who made the very early versions of Rust) likens it to a Goldilocks language [2]. [1] https://stackoverflow.com/questions/28078089/is-julia-dynamically-typed https://stackoverflow.com/questions/28078089/is-julia-dynami... [2] https://graydon2.dreamwidth.org/189377.html https://graydon2.dreamwidth.org/189377.html
- mamazmaz 11y agoThe difference between Julia and Big Bang is that Big Bang will check your types at compile time. You'll know before any of your code executes whether or not it will yield any type errors. Edit: (Disclaimer, I work on big bang)
- KenoFischer 11y agoHow do you handle, say deserialization of objects over a network (to give the canonical non-trivial example)?
- eru 11y agoI don't know about Julia or Big Bang, but in Haskell your values conforming to types for serialization / deserialization would typical be checked once when parsing, and throw an error (or use a Maybe type) if anything is off.
- KenoFischer 11y agoYes, that's the standard approach, but I was wondering how that meshed with not having to declare types (maybe the answer is just, that's the one place where you have to - or that's disallowed), but I was curious.
- oneJob 11y agoChapel Programming Language? By which I mean, Chapel seems like a great project to through support behind to add these feature sets. It is already very capable, had a good amount of resources, a roadmap, and seems that it would lend itself to this.