YakshaLang / Yaksha

😈 Yaksha Programming Language - Offside rule + Lisp system for macros. 🐣 WIP
https://yakshalang.github.io/
GNU General Public License v3.0
201 stars 12 forks source link

ccode in module level assignment #46

Closed ghost closed 1 year ago

ghost commented 1 year ago

a: Const[int] = ccode "abc" Shows up as #define yy__a (abc) Is this a bug or intentional?

JaDogg commented 1 year ago

It is intentional to expose globals etc.

FYI - I'm inactive these days and may not respond as I'm sick.

On Sat, 3 Jun 2023, 09:54 ac2pic, @.***> wrote:

a: Const[int] = ccode "abc" Shows up as

define yy__a (abc)

Is this a bug or intentional?

— Reply to this email directly, view it on GitHub https://github.com/YakshaLang/Yaksha/issues/46, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADZXUQ4SKIE77W237I42LDXJL3UVANCNFSM6AAAAAAYZFHLBU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghost commented 1 year ago

Thank you for replying. Hope you feel better.

JaDogg commented 1 year ago

In any case I would avoid using ccode unless it is really required. :) (wrapping a C library would be a good usecase in current version of Yaksha, but I would prefer to avoid that somehow in future versions of Yaksha)