Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon



Objective-J is a pl created in 2008.

#320on PLDB 14Years Old 376Users
0Books 0Papers 1kRepos

Objective-J is a programming language developed as part of the Cappuccino web development framework. Its syntax is nearly identical to the Objective-C syntax and it shares with JavaScript the same relationship that Objective-C has with the C programming language: that of being a strict, but small, superset; adding traditional inheritance and Smalltalk/Objective-C style dynamic dispatch. Pure JavaScript, being a prototype-based language, already has a notion of object orientation and inheritance, but Objective-J adds the use of class-based programming to JavaScript. Read more on Wikipedia...

Example from hello-world:
document.write("Hello World");
Example from Linguist:
@import <Foundation/CPObject.j> @implementation AppController : CPObject { } - (void)applicationDidFinishLaunching:(CPNotification)aNotification { // The end result of this layout will be the kind of master/detail/auxilliary view // found in iTunes, Mail, and many other apps. var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMakeZero() styleMask:CPBorderlessBridgeWindowMask], contentView = [theWindow contentView]; var navigationArea = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 150.0, CGRectGetHeight([contentView bounds]) - 150.0)]; [navigationArea setBackgroundColor:[CPColor redColor]]; // This view will grow in height, but stay fixed width attached to the left side of the screen. [navigationArea setAutoresizingMask:CPViewHeightSizable | CPViewMaxXMargin]; [contentView addSubview:navigationArea]; var metaDataArea = [[CPView alloc] initWithFrame:CGRectMake(0.0, CGRectGetMaxY([navigationArea frame]), 150.0, 150.0)]; [metaDataArea setBackgroundColor:[CPColor greenColor]]; // This view will stay the same size in both directions, and fixed to the lower left corner. [metaDataArea setAutoresizingMask:CPViewMinYMargin | CPViewMaxXMargin]; [contentView addSubview:metaDataArea]; var contentArea = [[CPView alloc] initWithFrame:CGRectMake(150.0, 0.0, CGRectGetWidth([contentView bounds]) - 150.0, CGRectGetHeight([contentView bounds]))]; [contentArea setBackgroundColor:[CPColor blueColor]]; // This view will grow in both height an width. [contentArea setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable]; [contentView addSubview:contentArea]; [theWindow orderFront:self]; } @end
Example from Wikipedia:
@implementation Address : CPObject { CPString name; CPString city; } - (id)initWithName:(CPString)aName city:(CPString)aCity { self = [super init]; name = aName; city = aCity; return self; } - (void)setName:(CPString)aName { name = aName; } - (CPString)name { return name; } + (id)newAddressWithName:(CPString)aName city:(CPString)aCity { return [[self alloc] initWithName:aName city:aCity]; } @end

Language features

Feature Supported Example Token
"Hello world"
Print() Debugging document.write
// A comment
Line Comments
// A comment
Semantic Indentation ϴ
asciidoc.html · objective-j.html · m4.html

View source

PLDB - Build the next great programming language · v2022 · Day 31 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub ·