| .idea | ||
| bob-language-extension | ||
| headers | ||
| source | ||
| tools | ||
| .gitignore | ||
| app.config | ||
| app.log | ||
| backup.txt | ||
| benchmark.py | ||
| BOB_LANGUAGE_REFERENCE.md | ||
| char_printer.bob | ||
| complex_test.bob | ||
| complexity_test.bob | ||
| config.txt | ||
| debug_generation.bob | ||
| debug_test.bob | ||
| file1.txt | ||
| file2.txt | ||
| file3.txt | ||
| final_regression_dynamic.bob | ||
| final_regression_test.bob | ||
| final_working_dynamic.bob | ||
| final_working_test.bob | ||
| fix_test.bob | ||
| fixed_regression_dynamic.bob | ||
| fixed_regression_test.bob | ||
| hello.txt | ||
| insane_regression_dynamic.bob | ||
| insane_regression_test.bob | ||
| large.txt | ||
| Makefile | ||
| mega_loader_simple.bob | ||
| mega_loader.bob | ||
| mega_regression_test.bob | ||
| minimal_working.bob | ||
| names.txt | ||
| original.txt | ||
| people.txt | ||
| proper_regression_dynamic.bob | ||
| proper_regression_test.bob | ||
| pseudo_oop_examples.bob | ||
| README.md | ||
| ROADMAP.md | ||
| simple_regression_dynamic.bob | ||
| simple.bob | ||
| string_indexing_demo.bob | ||
| string_indexing_errors_test.bob | ||
| string_indexing_final_test.bob | ||
| string_indexing_test.bob | ||
| success_demonstration.bob | ||
| success_test.bob | ||
| tco.bob | ||
| test_bob_language.bob | ||
| test_bracket_conflict.bob | ||
| test_fib.bob | ||
| test.txt | ||
| tests.bob | ||
| ultimate_regression_dynamic.bob | ||
| ultimate_regression_test.bob | ||
| ultimate_regression.bob | ||
| working_regression_dynamic.bob | ||
| working_regression_final.bob | ||
| working_regression_test.bob | ||
| working_regression.bob | ||
Bob
A modern programming language focused on safety and clarity.
Design Philosophy
Bob prioritizes safety and functional programming while keeping things practical.
Assignment System
Bob uses two types of assignments to prevent bugs while keeping useful functionality:
Assignment Statements
var x = 5;
x = 10; // Regular assignment
y += 5; // Compound assignment
Assignment Expressions (For Loops Only)
for (var i = 0; i < 5; i = i + 1) { } // Assignment in for loop
for (j = 0; j < 5; j += 1) { } // Assignment in for loop
Why This Design?
Prevents Common Bugs:
// This would be a bug in many languages:
if (x = 10) { } // Parse error in Bob - prevents accidental assignment
// Bob forces you to write:
x = 10;
if (x == 10) { } // Clear comparison
Keeps Expressions Pure:
// Prevents side effects in expressions:
var result = (x = 10) + (y = 20); // Parse error
// Forces clean code:
x = 10;
y = 20;
var result = x + y; // Pure expression
Supports Functional Programming:
// Prevents confusing patterns:
var value = condition ? (x = 10) : (x = 20); // Parse error
// Encourages clean patterns:
x = condition ? 10 : 20; // Clear assignment
Keeps For Loops Practical:
// For loops work naturally:
for (var i = 0; i < 10; i = i + 1) { } // Assignment expressions allowed
for (j = 0; j < 10; j += 1) { } // Assignment expressions allowed
Benefits
- Prevents Common Bugs: No accidental assignments in conditionals
- Expression Purity: Expressions have no side effects
- Clear Semantics: Assignments are clearly statements
- Functional Programming: Encourages pure function patterns
- Practical For Loops: Maintains useful for loop syntax
- Easier Debugging: Clear separation of assignment and expression logic
Features
- Type Safety: Dynamic typing with runtime type checking
- Functional Programming: First-class functions, closures, recursion
- Memory Management: Automatic memory management
- Error Handling: Comprehensive error reporting
- Standard Library: Built-in functions for common operations
- Tail Call Optimization: Efficient recursive function calls
Documentation
See BOB_LANGUAGE_REFERENCE.md for complete language documentation.
Building
make clean && make
./build/bob your_file.bob
Testing
./build/bob test_bob_language.bob