Hacker News new | ask | show | jobs
by pjmlp 2935 days ago
I program since 1986, had lots of fun around 1995 using Oberon system, one of Go's influences.

So naturally I used many programming languages with Go's limited set of features, which doesn't mean I want to return to those days.

1 comments

I'm not sure what your point is.. is it: "More features are better"?

I started programming a few years later than you.. first on Atari ST (Basic) then later in DOS (Pascal). I often wish myself back to these systems when I see today's bloated stacks of crap (obviously this does not apply to everything).

I don't think this is relevant for the original discussion though..

My point is ignoring features largely proven in mainstream languages is bad.

Even the last version of Turbo Pascal for MS-DOS (7.0) was more feature rich, ignoring the lack of GC for a moment.

Wut?
What he said. Turbo Pascal 7 a better designed language than Go, for the most part.
I'd like an example or two.
Enumerations in Turbo Pascal

    type Colours = (Red, White, Blue);

Enumerations in Go

    type Colours int

    const (
        Red Colours = iota
        White
        Blue
    )

FFI in Turbo Pascal

    function Sin(const num: Integer): Double; external 'ext name';
FFI in Go (requires external help from a C compiler)

   // #include <stdio.h>
   // #include <errno.h>
   import "C"

   func Sin (num uint) float32 {
      return C.sin
   }

Reference parameters in Turbo Pascal with null safety thanks type system

   procedure Swap(var a,b:Integer);
   var
      temp: Integer;
   begin
      temp:=a;
      a:=b;
      b:=temp
   end;

   Swap(x, y)
   Swap(nil, y) { compiler error: Got "Pointer" expected "SmallInt" }
Reference parameters in Go (no type safety via type system, manual testing for nil required)

   func Swap (a *int, b*int) {
      var temp = *a
      *a = *b
      *b = temp
   }

 
   Swap(&x, &y)
   Swap(nil, &y) { runtime error: Invalid memory address or nil pointer dereference }

I was also tempted to move the time scale from 1992 to 2009, but then I wouldn't be able to reproduce the generics from Object Pascal in Go.

Ah, and Turbo Pascal 5.5 was compiling around 34 000 lines/minute in computers whose CPUs were maxed at about 30 MHZ, http://edn.embarcadero.com/article/20803