compas-dev / compas-dev/compas_robots

Add public accessor(s) for proxied objects.

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4
Forks
8
PR merge metrics
No merged PRs in 30d

Description

submitting this as follow up of https://github.com/compas-dev/compas_robots/pull/25.

# Feature Request

Suggestion, add `unproxify()` and `unproxified()` to `ProxyObject` to allow public access to wrapped object wherever necessary, and return the original object or copy thereof correspondingly.

## Details

Currently done via accessing private attribute:
https://github.com/compas-dev/compas_robots/blob/eeb66626d72eb6ee2464dd47cf89e521ea76c48b/src/compas_robots/model/robot.py#L1040

**Is your feature request related to a problem? Please describe.**

The international high court for object oriented law has drawn our attention to the following potential violation of `Decree No. 42, Chapter 17, Sub-Chapter 8.3.1(c)(iv) — "The Inviolability of Encapsulation in Object-Oriented Programming"`.

**Describe alternatives you've considered.**

Stepping away from object oriented programming and re-writing the whole ecosystem in Haskell.
**Decision**: maybe another time.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.