News for hackers. Stuff that matters.
Re:The Squirrel Programming Language by iumtuip2001 on Sunday June 12, 2016 @01:18AM (#11886764)
I appear to be a dying breed. A young ( < 30 years old ) programmer, self taught, who loves classic, "mainstream" languages like C, C++, Java...

Why?

Types.

I cannot stand the road that new languages are on, abandoning the type system, or making it optional, or not explicit. Given that I appear to be a minority, I thank you for reading my rant... Have a good day :(

Re:The Squirrel Programming Language by haberman on Sunday June 12, 2016 @02:44AM (#11886964)
I don't think looser typing is the current trend at all. I think the opposite is true: there's a movement towards more typing, particularly among the languages that have traditionally been the most dynamically typed.

- Type hinting is a significant new feature in PHP 7.x: http://php.net/manual/en/migration70.new-features.php

- Python 3.5 introduces type hinting: https://docs.python.org/3/library/typing.html

- Ruby is talking about possibly adding a static typing system to Ruby 3.x (this is very early stage, but there appears to be interest): https://codon.com/consider-static-typing. Also 24 days ago Matz talked about possibly adding type inference to Ruby3x3: https://bugs.ruby-lang.org/issues/9999

- Flow and TypeScript add types to JavaScript.

- JavaScript is adding more structure to its type system with ES6 classes.

- Newer languages such as Swift and Dart are certainly more typed than the Python/Ruby/JavaScript generation.

- Rust is typed to the max.

I guess what I'm saying is that if you like type systems, the future is bright. :)

Re:The Squirrel Programming Language by tomku on Sunday June 12, 2016 @11:19AM (#11888464)
I would encourage you to leave your comfort zone and actually explore what's out there in terms of type systems. There are type systems that are MUCH more powerful and useful than C, C++ or Java. If you like C++ and Java, I would suggest Scala or Haskell.

I'd like to note that what you're talking about isn't "typing" versus "no typing", it's static typing versus dynamic typing. Both of them have type systems - it's just a question of whether the compiler refuses to compile programs unless it can prove that your usage of types is 100% correct. Since you sound like you're an autodidact, you might want to read up on some of the theory behind type systems - particularly the competing ideas of "soundness" and "completeness".

There are also good reasons why many people choose to use languages like Python or Ruby - they aren't just blindly ignorant of type theory or the benefits of type checking. They write different kinds of software than you do and have different needs. It's not a contest, other people using languages with dynamic typing does not mean there aren't great choices if you prefer static typing.

Edit: Squirrel also isn't a new language. It's from 2003, and it was designed for the niche of game scripting where its main competitors (Python, Lua) are all very dynamic too.

Re:The Squirrel Programming Language by vog on Sunday June 12, 2016 @04:14AM (#11887193)
Note that proper typesystems are not yet mainstream, though.

You should certainly have a look at "less mainstream" languages whose type systems are more expressive and still simpler to use than those of the "mainstream" languages. For example (list is incomplete, but you'll get the idea):

    * Haskell (very popular, hard to reason about performance, though)
    * OCaml (possible to reason about performance, except for garbage collection)
    * Idris (type system with dependent types!)
    * Rust (type system that allows to reason about memory usage, aliasing, etc.)
    * Elm (meant to replace JavaScript for user interfaces in the browser)
Re:The Squirrel Programming Language by rtpg on Sunday June 12, 2016 @06:11AM (#11887462)
I would add Purescript to that list. Most people see it as a Haskell-like for the JS VM, but it also includes row types. Meaning that your types can keep track of granular effects ("oh, this uses IO, but just the random number generator", "Oh this just looks at the foo property"), which is super useful for reasoning with larger codebases.
Re:The Squirrel Programming Language by lomnakkus on Sunday June 12, 2016 @01:04PM (#11889049)
Agreed. Purescript[1] is definitely interesting as one the very few languages in the world with row types/polymorphism.

I'm not quite agreed on the effects bit being useful, but it's a good demo of what the type system can do. My main disagreement with the whole approach is that effects don't commute (in general) and so representing effects as such isn't quite valid.

[1] I'm still baffled as to why they named it thusly. I mean, I can guess at motivations, but it really deserves a much catchier name!

Re:The Squirrel Programming Language by alkonaut on Sunday June 12, 2016 @07:43AM (#11887657)
> I cannot stand the road that new languages are on, abandoning the type system, or making it optional, or not explicit.

That trend is so 10 years ago. Today the pendulum is swinging the other way again. ML is having a comeback. Look at F#, Rust and Swift. They are mainstream and they are strongly typed (mostly)functional languages.

Re:The Squirrel Programming Language by bpicolo on Sunday June 12, 2016 @12:44PM (#11888945)
On the swing now that compilers are smart enough to do most of the typing guarantees without your input.
Re:The Squirrel Programming Language by tatterdemalion on Tuesday June 14, 2016 @01:23AM (#11899963)
That was true in 1973.
Re:The Squirrel Programming Language by jaked89 on Sunday June 12, 2016 @01:30AM (#11886783)
Rest assured, not all new languages take this route.

On the other side of the spectrum, type systems get stronger and more powerful. Read about dependent typing in Idris, F*. Also, nearly all academic work focuses on improved type systems.

Re:The Squirrel Programming Language by slezyr on Sunday June 12, 2016 @02:53AM (#11887002)
Ohhh... Rest assured. My first job was fixing bugs in existing mobile game. Here is the code:

// Method in some class in squirrel script

function Move()

{

   // ...  

   Jump();  

   // ...  
}

So... Where is the implementation of function Jump? In this class? Or in C++ class, which might add some methods to squirrel? Or it's in base class of squirrel? Or in C++ class of that base[squirrel] class? Also methods might be overridden. So... You need to find last implementation of that function.

You also need manually build an inheritance tree.

It's impossible to navigate in it's code. While you can use Sublime and it's Find. You still need to look through all the usages of function Jump in entire game.

Squirrel made me love all static typed languages with it's instant jump to implementation of some function.

Re:The Squirrel Programming Language by ta0967 on Sunday June 12, 2016 @02:25PM (#11889484)
it's its
Re:The Squirrel Programming Language by nine_k on Sunday June 12, 2016 @03:22AM (#11887074)
Types are great! Two obvious modern industrial-strength choices would be Rust and Haskell, though F#, C#, Swift and even Java 8 are pretty nice in this regard. (Even the anemic type system of C can be a great help.)
Re:The Squirrel Programming Language by emsy on Sunday June 12, 2016 @03:41AM (#11887118)
Squirrel is a scripting language, for example to use in games so the people writing the scripts don't need to recompile to see their changes. It's really a question of using the right tool for the problem at hand. I agree though that too many devs dismiss the benefits of static languages with no real gain in return.
Re:The Squirrel Programming Language by hellofunk on Sunday June 12, 2016 @08:05AM (#11887711)
When Apple introduced its main new programming language for OSX and iOS, it went from dynamic typing (Objective-C) to static typing (Swift).

One of the more interesting contenders in the "compile to Javascript" universe is Elm, which is also statically typed.

Perhaps are simply unaware of what the major "new languages" are.

Re:The Squirrel Programming Language by illivah on Sunday June 12, 2016 @01:36AM (#11886801)
I feel like we're just no longer the shiny hotness. I think a lot of people WANT to be self-made self-taught semi-low-level language programmers.

I listen to a lot of podcasts. My god, I just want a decent show that is NOT focused on web development. Is that so much to ask? Oh, and not ios/windows focused, 'cus then literally everything you talk about no longer applies to me. And not "a new language every week" because my god, you can't deep-delve into anything like that. Hell, not even javascript can be covered in an hour.

Re:The Squirrel Programming Language by DonaldFisk on Sunday June 12, 2016 @12:44PM (#11888949)
C is weakly typed.

You have to declare types in the languages you mention. You shouldn't have to. Type inference was figured out decades ago, it can be done by the compiler, and in some languages, it is.

Re:The Squirrel Programming Language by Sean1708 on Sunday June 12, 2016 @06:27AM (#11887493)
To be honest I'm struggling to think of any languages released in the last 5 years or so which don't have type systems. Obviously they exist, but I don't think they're as common at the moment.
Re:The Squirrel Programming Language by sullyj3 on Sunday June 12, 2016 @03:41PM (#11889887)
Heaps of modern language development focusses on types. Take rust for example.
Re:The Squirrel Programming Language by jamesu on Sunday June 12, 2016 @09:01AM (#11887908)
If you want a nicely embeddable language with strong typing, why not check out AngelScript?
Re:The Squirrel Programming Language by qznc on Sunday June 12, 2016 @06:16AM (#11887476)
I agree, there might be an open niche for a typed scripting language.
Re:The Squirrel Programming Language by sklogic on Sunday June 12, 2016 @08:53AM (#11887878)
What about the better typed languages - Coq, Agda, Idris, etc.? Java is not that strongly typed after all.