blachlylab / koalas

Ad hoc Data Frames
0 stars 0 forks source link

Deal with namespace collisions for columns and Dataframe functions #2

Open charlesgregory opened 4 years ago

charlesgregory commented 4 years ago

For now we prevent compilation with specified function names as column names.

https://github.com/blachlylab/koalas/blob/19f891cec0c846a68036ef6f3e32477c37d61136/source/koalas/dataframe.d#L25-L36

This code allows to retrieve a column like this df.col. We want to avoid situations where df.length as a column collides with length property function. https://github.com/blachlylab/koalas/blob/19f891cec0c846a68036ef6f3e32477c37d61136/source/koalas/dataframe.d#L43-L45

jblachly commented 4 years ago

should you in some, or all, cases add a prefix char like _ to avoid collision. for example, df._length ?

charlesgregory commented 4 years ago

I think that's reasonable solution as long as its consistent for all columns.