Top 1,000 Features Creators Events Podcasts Extensions Blog Explorer CSV Download

Adept

< >

Adept is a programming language created in 2018 by Isaac Shelton.

#1468on PLDB 6Years Old
Download source code:
git clone https://github.com/AdeptLanguage/Adept

A blazing fast language for general purpose programming.


Example from the web:
/* For values that use ownership-based memory management (e.g. String, List, Grid) we must transfer ownership if we want to keep them alive for longer than their owner's scope */ import basics func main { everyone <String> List = getEveryoneAttending() each fullname String in everyone { print("=> " + fullname) } } func getEveryoneAttending() <String> List { everyone <String> List person1 String = getFullnameReturnImmediately("Alice", "Golden") person2 String = getFullnameStoreAndThenLaterReturn("Bob", "Johnson") // Commit ownership of strings held by 'person1' and 'person2' // to be managed by the list everyone.add(person1.commit()) everyone.add(person2.commit()) // Commit ownership of the list to the caller return everyone.commit() } func getFullnameReturnImmediately(firstname, lastname String) String { // '.commit()' is not necessary here return firstname + " " + lastname } func getFullnameStoreAndThenLaterReturn(firstname, lastname String) String { fullname String = firstname + " " + lastname // Ownership of the result is held by 'fullname', // so we must transfer ownership to the caller in order // to keep it alive after this function returns // '.commit()' is necessary here return fullname.commit() }

View source

- Build the next great programming language About Resources Acknowledgements Part of the World Wide Scroll