• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Scala (and Swift) and Chargen

robject

SOC-14 10K
Admin Award
Marquis
I've been meaning to learn Scala. What I need to do is justify it with a Traveller application. Not just a random sector generator.

Maybe a character generator? That's got a rich sort of complexity in it that doesn't exist even in world building (or does it? I wonder if world-building can be boiled down into something akin to character generation?)


Anyway, Scala. I found a website that compares Scala to Swift, and it looks like (superficial) convergence to me, whether intentional or otherwise. They're not the same language, but the syntax overlaps so that some statements are identical in both languages.

I note this because in my experience that tends to only happen in languages which are related -- C and C++, JavaScript and ActionScript, or (to a lesser extent) Java and C#. But look at Pascal and you know you're looking at Pascal. Look at C and you know it's C.


Better to use the phrase that this website uses: Swift is a lot like Scala. No argument there.

They are not the same language, of course. But I thought the comparison was interesting.
 
Swift looks cool -- much cleaner than Scala, in my opinion -- but is it available for any platform other than iOS/MacOS?
 
Char Gen usually has an interactivity higher than does world/system gen.
 
Swift looks cool -- much cleaner than Scala, in my opinion -- but is it available for any platform other than iOS/MacOS?

Apparently there is.

Swift uses the same object model and relies on the same frameworks as Objective C. There are cross platform versions of Objective C and also GNU implementations of some of the ancestors of the Mac frameworks called GNUStep (based on NextStep/OpenStep). They've diverged from the versions on the Mac though.

There is an effort to port Swift to that GNU platform, but it's in the early stages. That's hardly surprising as the syntax and even the semantics of Swift itself haven't been completely finalised yet.

Whether or not the GNU version will ever amount to anything is moot. It hasn't yet.

Simon Hibbs
 
Swift looks cool -- much cleaner than Scala, in my opinion -- but is it available for any platform other than iOS/MacOS?

As Simon noted, not yet. It's an Apple in-house language to aid app writing. If I recall, it can be intermixed with Objective C.
 
There is an effort to port Swift to that GNU platform, but it's in the early stages. That's hardly surprising as the syntax and even the semantics of Swift itself haven't been completely finalised yet.

The Apple site says, "With the release of Xcode 6.1 and iOS 8, Swift 1.1 is final."

Are you saying there's still a lot of major stuff in flux, despite 1.1 being "final"? (Stranger things have happened in development tools.)

I'm a Java programmer, mainly, but I have a C background (less so with C++ and no Objective-C experience). I recently purchased my first Mac (though my wife has had various Macs for decades, and I have had an iPad for a while). I'm thinking of getting into Swift development for fun and profit.
 
Swift is very easy to learn, especially if you have some Objective-C background. Though coming at it from Java (or Scala) is not difficult.

If your background is Java, the easiest jump to make is C#. I've largely moved on from Java except in places where the customer requires it (it was my primary language for a long time because of the cross-platform support), and using C# with Mono is my norm now (except for all those times when I'm working in another language for a larger project--usually ANSI/ISO C.)

Going to Scala from Java is easy, too, but then going back to Java again will be difficult. Very difficult. :D
 
Right now Swift is definitely the way to go for native Mac and OSX development and I'm sorely tempted to give it a try. I'm just having too much fun playing with Pythonista on my iPad at the moment and the only window I have free for spare time programming is on the train anyway.

My understanding of the status of Swift is that yes it is in flux and things will still change, but by saying it's 'final' or whatever it is basically a flag saying this version will be accepted for apps submitted to the App Store.

Simon Hibbs
 
I was looking through Swift's syntax. Interesting. "Let" is back. I haven't seen it used since ZX81 Basic.

Swift is trying to do what Python already does, but in a compiled fashion like C. So strong typing is necessary. I can't stand C, or other compiled languages. If code doesn't need to be compiled for Apples, I see Python used en masse on them.
 
Back
Top