Sunday, November 8, 2015

OO Hello World - Silver

Hi-yo Silver! Away!

The Hello World in Silver is here! Silver is a free implementation of Apple's Swift programming language being actively developed by RemObjects, the company behind the exceptional language Oxygene.

As mentioned on their website: "Silver is a truly native Swift compiler for the .NET CLR, the Java/Android JVM and the Cocoa runtime. Built on over ten years of solid compiler knowledge and technology, Silver is a truly native Swift compiler for the .NET CLR, the Java/Android JVM and the Cocoa runtime."

By the way, you can see my previous post here: where I give some details on WHY these "OO Hello World series" samples.

Version 1 (Minimal):
The minimum you need to type to get your program compiled and running.
class Greet {
 var name: String

 init(name: String) { = Char.ToUpper(name.0) + name.Substring(1)

 func salute() {
  println("Hello \(name)!")

let g = Greet(name: "world")

Version 2 (Verbose):
Explicitly adding instructions and keywords that are optional to the compiler.
import System
class Greet {
 private var name: String

 public init(name: String) { = Char.ToUpper(name.0) + name.Substring(1)

 public func salute() {
  println("Hello \(name)!")

let g = Greet(name: "world")

The Program Output:

Swift (Silver) Info:
“Swift is a new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun..” Taken from:

Current Version:
Silver 8.2 beta, Swift 2.1 (latest version in "Languages" page
Developed by:
Silver by RemObjects, Swift by Apple Inc.
Silver by RemObjects, Swift by Chris Lattner and Apple Inc.
Influenced by:
Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, D 
Predecessor Language

Predecessor Appeared

Predecessor Creator

Runtime Target:
Latest Framework Target:
CLR 4.x JDK 8
Mono Target:
Allows Unmanaged Code:
Source Code Extension:
Silver 89, Swift 80
Case Sensitive:
Free Version Available:
Open Source:
Swift Yes, Silver No.
Latest IDE Support:
Visual Studio 2013
Language Reference:
More Info:

1 comment:

  1. This blog awesome and i learn a lot about programming from here.The best thing about this blog is that you doing from beginning to experts level.

    Love from