Interpreting Carbon



Google has shared a post on the new programming language Carbon, outlining the following features:

Introducer keywords and a simple grammar
I bet this is similar to make function()

Function input parameters are readonly values
make function(x) with x is read only; provides pointers to x within a nested function.

Pointers provide indirect access & mutation
Through being read only a pointer can reference a function with mutation through updating it in the stack.

Use expressions to name types
A type being a bit's expression changing value

The package is the root namespace
Admin is root

Import APIs through their package name
See solution for package manager and inheritence of version control

Explicit object parameter declares a method
Like: 
    let a be f(x,y) ( f(x)=.., f(y)=...)
OR
    let b be g(x,y) ( g(x)=..., f(y)=[...,g(x), ...]

Single inheritance; classes are final by default
Trace and stiffen, basically tidying up classes from root aka Admin = programmer, namespace is whatever you declare to be your 'home page/folder' / 'desktop'

Powerful, definition-checked generics
Prolog checked variable instantiation

Types explicitly implement interfaces
Interface construction is held up to the stack alright.


Comments

  1. Tbh, here:
    let b be g(x,y) ( g(x)=..., f(y)=[...,g(x), ...]
    you need to provide a break in the function f() after the g(x) function call to make it not endlessly declare.

    ReplyDelete
  2. So what if you:
    let b be g(x,y) (g(x) = pixelX0,pixelX1), (f(y)=g(g(pixelX0,g(pixelX1))

    This creates a 3d image from a sprite?

    ReplyDelete
  3. So if the reverse is also true trough tracing back into a 2d sprite by: let d be z(x,y) z(x)
    Then you can put 3d objects into 2d memory. Create sprites from models and reversely upscale them in dimension to 3d again. Zip it, sexy models!

    ReplyDelete
  4. So if you basically want to speed up zipping/unzipping sexy models, you need to use 4+bot hardware.

    ReplyDelete

Post a Comment