Comments (5)
// @PolyGN
from arua-meta.
I think this could be handy... Would be easier to parse a single token @
rather than this
as a string literal.
I haven't used CoffeeScript but I have seen it, so yeah, the usage of using a @
could be quite [as you put it] succinct.
Now a question on the actual syntax of using @
rather than this
, would it be used (in Arua) like this:
@.foo
@.bar
or more around the lines of
@foo # C++ equivalent: this.foo
@bar # C++ equivalent: this.bar
from arua-meta.
@PolyGN the second.
from arua-meta.
@Qix- perfect! That now makes it even faster for the compiler rather than having the period, less text.
from arua-meta.
But also less readable, I think.
If you're curious, all of the code I'm writing to test the lexer/parser is being pasted into a word document with no syntax highlighting - usually only done for things I'm not sure about (in terms of readability or maintainability). If it's not immediately obvious what it's doing, or if it requires a bunch of second looks, I am killing it.
This was the first thing I noticed. Look at it without syntax highlighting:
use math.*
on Foo be Bar
fn something(foo i32, bar i32, qux f32) f32
ret sin(bar as i32) * (6 * foo + @foo * bar * cos(foo as i32 * @qux) + qux) * 2
versus
use math.*
on Foo be Bar
fn something(foo i32, bar i32, qux f32) f32
ret sin(bar as i32) * (6 * foo + this.foo * bar * cos(foo as i32 * this.qux) + qux) * 2
I'm not sure which is more readable, but with syntax highlighting there's no mistake - this
is much more readable since it'll be treated as a keyword.
from arua-meta.
Related Issues (20)
- RFC: Arrays HOT 3
- RFC: Unicode Support HOT 6
- RFC: Primitive Types and Type Qualifiers HOT 1
- RFC: Comments, Docs and Headers HOT 4
- RFC: Numeric Literals HOT 5
- RFC: Method Forwarding HOT 6
- RFC: StdLib: std.math (Math library) HOT 3
- Syntax is Style philosophy? HOT 5
- RFC: Custom operators HOT 8
- RFC: Visibility HOT 5
- RFC: Terminology
- RFC: Namespacing (Zones) HOT 1
- RFC: Compiler Details
- RFC: ABI
- Out of box compatibility with JVM HOT 2
- RFC: Pluggable Semantics HOT 2
- RFC: Enumerations
- RFC: Traits vs. Composition + Forwarding
- RFC: Tuples HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arua-meta.