Git Product home page Git Product logo

Comments (5)

Qix- avatar Qix- commented on June 11, 2024

// @PolyGN

from arua-meta.

corbin-r avatar corbin-r commented on June 11, 2024

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.

Qix- avatar Qix- commented on June 11, 2024

@PolyGN the second.

from arua-meta.

corbin-r avatar corbin-r commented on June 11, 2024

@Qix- perfect! That now makes it even faster for the compiler rather than having the period, less text.

from arua-meta.

Qix- avatar Qix- commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.