jscl-project / jscl

A Lisp-to-JavaScript compiler bootstrapped from Common Lisp

Home Page:https://jscl-project.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SIMPLE-VECTOR

kasper-pixelated-noise opened this issue · comments

ABCL:

CL-USER(1): (typep #(1 2) '(simple-vector 2))
T

JSCL

CL-USER>  (typep #(1 2) '(simple-vector 2))
ERROR: Unknown type-specifier (SIMPLE-VECTOR 2).

Is it done? I'm still getting the same error.

commented

At now In JSCL any one-dimensional array - its a simple vector.
I dont think that before the implementation of the subtypep, its necessary to multiply entities.
In case of emergency - we has a deftype - any type at any time.

Sure but then (typep #(1 2) '(simple-vector 2)) should return T instead of throwing the error?

commented

Hmmm
I'll take care

commented

@davazp

Well
To start

  1. I did not define such a type either in hardcode or as user-defined via DEFTYPE

  2. I would like to look at the type definition through the DEFTYPE of this type in order to first determine the scale of the problem and how to solve it

  3. In the general case, this problem is solved by a competent definition (DEFTYPE simple-vector...) on the user side

  4. For most users, there is no difference between vector and simple-vector other than the simple- name prefix. For a user who has this difference, there is a DEFTYPE (this is a custom case, completely on his side, with all the side effects of the current implementation).