2 Replies - 642 Views - Last Post: 09 July 2016 - 01:29 PM

#1 tohoyn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 09-July 16

Announcement: Programming language Theme-D

Posted 09 July 2016 - 08:54 AM

Theme-D is a programming language extending Scheme with static typing. Some features of Theme-D are:

* Static type system
* A simple object system
* Multi-methods dispatched runtime (and also compile-time)
* Parametrized (type parameters) classes, types, and procedures
* Signature types resembling Java interfaces but multiply dispatched.
* A module system
* Two kinds of variables: constants and mutable variables. The value of a constant cannot be changed after the constant is created.

Here is "Hello world" in Theme-D:
(define-program hello-world

        (import (standard-library core)
                (standard-library console-io))

        (define main
          (lambda (() <none> nonpure)
	    (console-display-line "Hello, world!"))))



Theme-D-Gnome is a wrapper library that gives access to Gnome and GTK libraries in Theme-D. It is based on guile-gnome. Only a small portion of Gnome and GTK has been checked to work with Theme-D-Gnome.
Here is a graphical version of "Hello world":

(define-program (gnome-examples hello)
      
      (import (standard-library core)
              (gnome gobject)
	      (gnome gtk))

      (define-simple-proc main (() <none> nonpure)
        (let ((window (gtk-window-create 'toplevel))
	      (button (gtk-button-create-with-label "Hello, World!")))
          (set-border-width window 10)
          (add window button)
          (connect
           button 'clicked
           (lambda (((args (rest <object>))) <object> nonpure)
	     (gtk-main-quit)
	     null))
          (show-all window)
          (gtk-main))))



Here are links for Theme-D home page and Theme-D-Gnome home page

Is This A Good Question/Topic? 0
  • +

Replies To: Announcement: Programming language Theme-D

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13569
  • View blog
  • Posts: 54,143
  • Joined: 12-June 08

Re: Announcement: Programming language Theme-D

Posted 09 July 2016 - 09:43 AM

Why?
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12189
  • View blog
  • Posts: 45,251
  • Joined: 27-December 08

Re: Announcement: Programming language Theme-D

Posted 09 July 2016 - 01:29 PM

The links you posted don't even work. Additionally, the Functional Programming forum is for technical help questions and legitimate news posts, not sharing your personal project or spam. I'll close this thread.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1