Comments (7)
It is fine as you described. We handle forward references, so it should not arise issues. If the functions are related, then they probably would goto a specific file better, (e.g: list.lisp, string.lisp, sequence.lisp) etc.
For non-trivial functions, consider to define it prefixed with !
, so we can test it easily from CL without recompiling. Then, you can define an alias like (fset 'foo #'!foo)
. In fact, I think we should suggest a convention and do the conversion automatically.
The conventions are very open yet, but feel free to add the HACKING
file with your experience if you like. We will change it as new conventions come.
from jscl.
It is fine as you described. We handle forward references, so it should not arise issues. If the functions are related, then they probably would goto a specific file better, (e.g: list.lisp, string.lisp, sequence.lisp) etc.
Cool, that sounds good.
In fact, I think we should suggest a convention and do the conversion automatically.
Sounds like a good idea. Maybe I could define some macros like !defun
and !defmacro
in boot.lisp
which do this? Or are you thinking of searching the package for functions named using this convention and aliasing them all at once just before export?
The former would probably be easier, and we have intern
, string
and subseq
at that point so it should be doable.
The conventions are very open yet, but feel free to add the HACKING file with your experience if you like. We will change it as new conventions come.
Okay, I'll add it at some point. It's a good thing to have, even if there's not much in it, as people can add stuff to it as it occurs to them.
from jscl.
Although of course !defun
wouldn't be defined in the CL implementation you were testing with... I'm not sure, do you have any ideas?
from jscl.
Nevermind, I just noticed that utils.lisp
is loaded by host and target. I'll define the macros in there.
from jscl.
You can define the macro conditionally to be the ordinary defun
on the host.
But I think it is the second approach. We would use !read
for example in the code. If you load it in CL, it does not collide and you can use it. But just before finishing bootstrap, we would look for and rename prefixed functions.
There is a issue however, we actually store the macros in their list representation and dump them with the environment. But it would break if a macro use some !
prefixed function. Therefore, we should compile properly the macros into the output file, which is the right thing on the other hand.
So, by now let us forget it, but I will open a ticket in order not to forget it.
from jscl.
Okay. So, for now I should just define functions normally, without the !
prefix? And then once you've made the requisite changes to how macros work we can change them to use the !
prefix?
from jscl.
For now do what is more comfortable for you, do not worry too much about it. If you want to prefix your functions, define an alias manually. !proclaim
in boot.lisp
is doing this, for example.
from jscl.
Related Issues (20)
- Wrong character reading
- default key values bug HOT 1
- The "ANSI Compliance milestone" Link on the Wiki is Broken HOT 2
- Function EXPORT not working as expected while compiling.
- Macros are treated as function while compiling
- ERROR: Function 'LOG' undefined HOT 1
- feature testing not work as intended at compile time HOT 1
- nested feature testing: ERROR: ECASE expression failed for the object `NIL'. HOT 1
- ERROR: Function 'EQUALP' undefined HOT 2
- ERROR: Function 'BIT-VECTOR-P' undefined
- ERROR: Function 'FLOAT' undefined HOT 2
- make-array: ERROR: Unknown keyword argument INITIAL-CONTENTS
- ERROR: Function 'ROTATEF' undefined
- (SETF GETF) is buggy HOT 3
- vector dimensions are wrong HOT 1
- (type-of float-with-exponent) returns 'INTEGER HOT 2
- Race condition in reader HOT 5
- &allow-other-keys not working
- Backquote bug HOT 4
- destructuring-bind bug HOT 1
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 jscl.