On Wednesday, January 06, 2016 06:06:17 AM Ismael Venegas Castelló wrote:
> could we
> switch to arrays instead of keep using svecs once julia defines the array
> type?

Won't work. svecs are used all over the C code, because the C code is the core 
from which you bootstrap. Moreover, you don't "throw away" the C code once 
more of julia is up and running---it's still used to manipulate ASTs, compute 
type intersection and subtyping, perform method dispatch, perform codegen, 
etc.

If you tried to "switch" to arrays, you'd have to implement everything twice, 
effectively.

--Tim

> 
> El martes, 5 de enero de 2016, 9:09:08 (UTC-6), Matt Bauman escribió:
> > On Tuesday, January 5, 2016 at 3:23:14 AM UTC-5, Ismael Venegas Castelló
> > 
> > wrote:
> >> Why force `methods` to work with anything?
> > 
> > Because you can call anything:
> > 
> > julia> call(x::Char) = x+1
> > call (generic function with 1038 methods)
> > 
> > julia> 'c'()
> > 'd'
> > 
> > julia> methods('c')
> > 
> > 1-element Array{Any,1}:
> >  call(x::Char) at none:1
> > 
> > There's been a much stronger push for documenting the external interfaces,
> > but there's more and more internal developer documentation these days, too
> > ( http://docs.julialang.org/en/latest/devdocs/julia/).  It's getting
> > better.
> > 
> > I believe flisp.boot is a generated file.
> > 
> > Builtins are simply functions (and types) that are written in C; necessary
> > for bootstrapping.  You can find the mapping between their Julia names and
> > the C definitions here:
> > https://github.com/JuliaLang/julia/blob/baf174f5c252a438006c6f23ed7097fbab
> > 004025/src/builtins.c#L1202-L1284.> 
> >  Search for their C names to find their definitions.  They accept any
> > 
> > number of Any arguments within their function definitions, but those that
> > require a certain number of arguments have error checking within the C
> > function.
> > 
> > Also note that anonymous functions have the type `Function`, too.  The
> > introspection utility you want is `isgeneric`.  I imagine lots of this
> > will
> > change with the jb/functions branch, where all functions are generic.

Reply via email to