Write a .drop file. Run it. Get a working prototype.
Drop is a zero-ceremony prototyping language. No boilerplate, no config, no dependencies. If you're typing anything that isn't your idea, Drop has failed.
go install github.com/superciccio/drop-lang/cmd/drop@latestOr download a binary from Releases.
name = "World"
print "Hello, {name}!"
drop hello.dropserve 8080
store "todos"
get "/"
page "My Todos"
each todo in load "todos"
row
text todo.name
button "Delete" -> delete "/todos/{todo.id}"
form "New Todo"
input "name"
submit "Add" -> post "/todos"
post "/todos"
save "todos" body
respond body 201
delete "/todos/:id"
remove "todos" id
respond "Deleted"
get "/api/todos"
respond load "todos"
That's it. Run drop todo.drop, open localhost:8080. You get a styled dark-theme UI, JSON API, and persistent storage.
Variables, strings with interpolation, lists, maps, functions, if/else, for/in, comments. No type declarations, no semicolons, no ceremony.
colors = ["red", "green", "blue"]
user = {name: "Andrea", role: "builder"}
do greet(who)
return "Hey, {who}!"
for color in colors
print color
serve starts an HTTP server. Define routes with get, post, put, delete. Return data with respond. Access request body with body and route params by name.
serve 3000
get "/users/:id"
respond {id: id, name: "Andrea"}
Strings respond as text/html. Lists and maps respond as application/json. Routes under /api/* always return JSON.
store declares a JSON-backed data store. save, load, remove do what you'd expect. IDs are auto-generated.
store "notes"
save "notes" {title: "First note"}
notes = load "notes"
page blocks build styled HTML with zero CSS. Use text, row, each, button, form, input, submit, link, and image. The -> operator connects UI actions to routes.
page "Dashboard"
text "Welcome back"
button "Refresh" -> get "/data"
Hit any route from a browser and lists/maps auto-render as styled HTML tables and cards.
Pull data from external APIs. JSON responses are parsed automatically.
data = fetch "https://api.example.com/items"
Server apps auto-restart when you save the .drop file. No manual restarts during development.
Install syntax highlighting for your editor:
drop --editor vscode
drop --editor vim
drop --editor sublime
drop --editor zedFull language reference and guides at superciccio.github.io/drop-lang.